import Vue from 'vue'
import Router from 'vue-router' 
import home from '@/components/home.vue';
// 导入 CarouselManagement 组件
import CarouselManagement from '@/components/CarouselManagement.vue';
import AIInteraction from '@/components/AIInteraction.vue';
import UserInfoManagement from '@/components/user/UserInfoManagement.vue';
import UserAccountManagement from '@/components/user/UserAccountManagement.vue';
import UserBehaviorManagement from '@/components/user/UserBehaviorManagement.vue';
import UserStatistics from '@/components/statistics/UserStatistics.vue'
import ContentStatistics from '@/components/statistics/ContentStatistics.vue'
import AccessStatistics from '@/components/statistics/AccessStatistics.vue'
import LogManagement from '@/components/system-settings/LogManagement.vue'
import RoleManagement from '@/components/system-settings/role-management.vue'
import PostManagement from '@/components/forum-management/PostManagement.vue';
import CommentManagement from '@/components/forum-management/CommentManagement.vue';
import SensitiveWordManagement from '@/components/forum-management/SensitiveWordManagement.vue';
import DiseaseCategoryManagement from '@/components/forum-management/DiseaseCategoryManagement.vue';
import FeedbackManagement from '@/components/FeedbackManagement.vue';
import HealthTipsManagement from '@/components/HealthTipsManagement.vue';
import MedicalReportManagement from '@/components/health-record-management/MedicalReportManagement.vue';
import MedicalHistoryManagement from '@/components/health-record-management/MedicalHistoryManagement.vue';
// 在导入部分添加
import MedicalReimbursementManagement from '@/components/health-record-management/MedicalReimbursementManagement.vue';

//登录注册
import Login from '../components/Login_Register/Login.vue';
import Register from '../components/Login_Register/Register.vue';
import ForgotPassword from '../components/Login_Register/ForgotPassword.vue';
import UserAgreement from '../components/Login_Register/UserAgreement.vue';
import Privacy from '../components/Login_Register/Privacy.vue';

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/home',  
      name: 'home',  
      component: home,
      children: [
        {
          path: 'ai-interaction',
          component: AIInteraction
        },
        {
          path: '/role',
          name: 'RoleManagement',
          component: () => import('@/components/system-settings/role-management.vue')
        },
        // 添加用户信息管理路由
        {
          path: '/user-info',
          name: 'UserInfoManagement',
          component: () => import('@/components/user/UserInfoManagement.vue')
        },
        {
            path: '/user-account-management',
            name: 'UserAccountManagement',
            component: () => import('@/components/user/UserAccountManagement.vue')
        },
        {
            path: '/user-behavior',
            name: 'UserBehaviorManagement',
            component: () => import('@/components/user/UserBehaviorManagement.vue')
        },
        {
            path: '/user-statistics',
            name: 'UserStatistics',
            component: UserStatistics
        },
        {
            path: '/content-statistics',
            name: 'ContentStatistics',
            component: ContentStatistics
        },
        {
            path: '/access-statistics',
            name: 'AccessStatistics',
            component: AccessStatistics
        },
        // 添加新的路由配置
        {
          path: '/log-management',
          name: 'LogManagement',
          component: () => import('@/components/system-settings/LogManagement.vue')
        },
        {
          path: '/role-management',
          name: 'RoleManagement',
          component: () => import('@/components/system-settings/role-management.vue')
        },
        // 添加论坛管理相关路由
        {
          path: '/post-management',
          name: 'PostManagement',
          component: PostManagement
        },
        {
          path: '/comment-management',
          name: 'CommentManagement',
          component: CommentManagement
        },
        {
          path: '/sensitive-word-management',
          name: 'SensitiveWordManagement',
          component: SensitiveWordManagement
        },
        {
          path: '/disease-category-management',
          name: 'DiseaseCategoryManagement',
          component: DiseaseCategoryManagement
        },
        // 添加意见反馈管理路由
        {
          path: '/feedback-management',
          name: 'FeedbackManagement',
          component: FeedbackManagement
        },
        // 添加轮播图管理路由
        {
          path: '/carousel-management',
          name: 'CarouselManagement',
          component: CarouselManagement
        },
        {
          path: '/personal-info',
          name: 'PersonalInfoManagement',
          component: () => import('@/components/PersonalInfoManagement.vue')
        },
        {
          path: '/health-data',
          name: 'HealthData',
          component: () => import('@/components/health-record-management/HealthDataManagement.vue')
        },
        {
          path: '/medical-report-management',
          name: 'MedicalReportManagement',
          component: MedicalReportManagement
        },
        {
          path: '/tips',
          name: 'HealthTipsManagement',
          component: HealthTipsManagement
        },
        {
          path: '/hot-topics',
          name: 'HotTopics',
          component: () => import('@/components/HotTopicsManagement.vue')
        },
        // 添加公益信息管理路由
        {
          path: '/public-info',
          name: 'PublicInfoManagement',
          component: () => import('@/components/PublicInfoManagement.vue')
        },
        {
          path: '/medical-report-management',
          name: 'MedicalReportManagement',
          component: MedicalReportManagement
        },
        {
          path: '/medical-history',
          name: 'MedicalHistoryManagement',
          component: MedicalHistoryManagement
        },
        // 在routes数组中添加新路由
        {
          path: '/medical-reimbursement',
          name: 'MedicalReimbursementManagement',
          component: MedicalReimbursementManagement
        },
        //登录注册
        {
          path:'/login',
          name:'Login',
          component: Login
        },
        {
          path:'/Register',
          name:'Register',
          component:Register
        },
        {
          path:'/ForgotPassword',
          name:'ForgotPassword',
          component:ForgotPassword
        },
        {
          path:'/Privacy',
          name:'Privacy',
          component:Privacy
        },
        {
          path:'/UserAgreement',
          name:'UserAgreement',
          component:UserAgreement
        }
      ]
    }
  ]
})